<template>
  <div>
    <h1 ref="hh" id="h1">你好世界！</h1>
    <button @click="get">点我获取</button>
  </div>
</template>

<script>
export default {
  data(){
    return{
      
    }
  },
  methods:{
    get(){
      const h1 = document.querySelector('h1')
      console.log(h1);
      console.log(this.$refs.hh);
    }
  }
}
</script>

<style>

</style>